package hoodoos.rule.script.graphics.compiler.generator;

import java.util.Set;

public class CollectionFunction {
  public static boolean in(Set<String> ruleParam, String param) {
    if (ruleParam == null || ruleParam.isEmpty()) {
      return false;
    }
    return ruleParam.contains(param);
  }

  public static boolean notIn(Set<String> ruleParam, String param) {
    if (ruleParam == null || ruleParam.isEmpty()) {
      return false;
    }
    return !ruleParam.contains(param);
  }

  public static boolean isNullOrEmpty(Set<String> ruleParam) {
    return ruleParam == null || ruleParam.isEmpty();
  }
}
